<script lang="ts">
import { showToast } from 'vant'
import { defineComponent, ref, onMounted, watch, onUnmounted } from 'vue';
import { useRouter, useRoute } from 'vue-router'
import { useScroll } from '../hooks/useScroll'

export default defineComponent({
  setup() {
    let showShare = ref(false);
    let router = useRouter()

    let options = [
      { name: '微信', icon: 'wechat' },
      { name: '微博', icon: 'weibo' },
      { name: '复制链接', icon: 'link' },
      { name: '分享海报', icon: 'poster' },
      { name: '二维码', icon: 'qrcode' },
    ];

    let onSelect = (option:any) => {
      showToast(option.name);
      showShare.value = false;
    };

    return {
      options,
      onSelect,
      showShare,
    };
  },
});
</script>
<template>
  <div style="height: 6000px; width: 100%;">
  1111111
  <div v-for="item in 10">
    <van-cell title="显示分享面板" @click="showShare = true" />
  </div>



      <van-share-sheet v-model:show="showShare" title="立即分享给好友" :options="options" @select="onSelect" />

  </div>
</template>
  <script></script>
 